CREATE PROCEDURE [dbo].[authors_delete]
@authorId int
AS
DELETE FROM [dbo].BooksByAuthor
WHERE
    [BooksByAuthor].[AuthorId] = @authorId

DELETE FROM [dbo].[Authors]
WHERE
    Authors.[AuthorId]=@authorId
RETURN 0
